package com.zhang.domain;

import com.zhang.utils.DateUtils;

import java.util.Date;

//日志bean
public class SysLog {
	private String id;
	private Date visitTime;
	private String visitTimeStr;
	private String username;
	private String ip;
	private String url; //访问的url地址
	private Long executionTime;
	private String method;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Date getVisitTime() {
		return visitTime;
	}

	public void setVisitTime(Date visitTime) {
		this.visitTime = visitTime;
	}

	public String getVisitTimeStr() {
		if(visitTime != null){
			visitTimeStr = DateUtils.date2str(visitTime,"yyyy-MM-dd HH:mm:ss");
		}
		return visitTimeStr;
	}

	public void setVisitTimeStr(String visitTimeStr) {
		this.visitTimeStr = visitTimeStr;
	}

	public String getUsername() {
		return username;
	}


	public void setUsername(String username) {
		this.username = username;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Long getExecutionTime() {
		return executionTime;
	}

	public void setExecutionTime(Long executionTime) {
		this.executionTime = executionTime;
	}

	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}
}
